package org.wang.generalcode.modules.sys.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户信息表实体类
 *
 * @author wz
 * @since 2024-08-08
 */
@Data
@Schema(description = "用户信息表")
@TableName("sys_user")
public class User implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	/**
	* 用户名
	*/
	@Schema(description = "用户名")
	private String username;
	/**
	* 昵称
	*/
	@Schema(description = "昵称")
	private String nickname;
	/**
	* 性别((1-男 2-女 0-保密)
	*/
	@Schema(description = "性别((1-男 2-女 0-保密)")
	private Integer gender;
	/**
	* 密码
	*/
	@Schema(description = "密码")
	private String password;
	/**
	* 部门ID
	*/
	@Schema(description = "部门ID")
	private Long deptId;
	/**
	* 用户头像
	*/
	@Schema(description = "用户头像")
	private String avatar;
	/**
	* 联系方式
	*/
	@Schema(description = "联系方式")
	private String mobile;
	/**
	* 状态((1-正常 0-禁用)
	*/
	@Schema(description = "状态((1-正常 0-禁用)")
	private Integer status;
	/**
	* 用户邮箱
	*/
	@Schema(description = "用户邮箱")
	private String email;
	/**
	* 创建时间
	*/
	@Schema(description = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	@JsonInclude(value = JsonInclude.Include.NON_NULL)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createTime;
	/**
	* 创建人ID
	*/
	@Schema(description = "创建人ID")
	private Long createBy;
	/**
	* 更新时间
	*/
	@Schema(description = "更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@JsonInclude(value = JsonInclude.Include.NON_NULL)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime updateTime;
	/**
	* 修改人ID
	*/
	@Schema(description = "修改人ID")
	private Long updateBy;
	/**
	* 逻辑删除标识(0-未删除 1-已删除)
	*/
	@Schema(description = "逻辑删除标识(0-未删除 1-已删除)")
	private Boolean isDeleted;

}
